import 'dart:io';

bool isExpired(DateTime start, DateTime end) {
  return end.difference(start).inHours > 6;
}

test() {
  var start = DateTime.now();
  sleep(Duration(seconds: 3));
  var end = DateTime.now();
  print(end.difference(start).inHours);
  print(end.difference(start).inMinutes);
  print(end.difference(start).inSeconds);
  print(isExpired(end, start));
}

testDuration() {
  var duration = Duration(seconds: 10) - Duration(seconds: 2);
  print('${duration}');
  print('${duration.isNegative}');
  print('${duration.inMinutes}');
  print('${duration.inSeconds}');
  print('${duration.inMilliseconds}');
}

main() {
  testDuration();
}
